#include "priority.h"

using namespace xy;
using std::cout;
using std::endl;
using std::vector;

void test1() {
	priority_queue<int> p;
	p.push(6);
	p.push(3);
	p.push(5);
	p.push(2);
	p.push(7);
	p.push(1);

	while (!p.empty()) {
		cout << p.top() << ' ';
		p.pop();
	}
	cout << endl;
}

void test2() {
	priority_queue<int, vector<int>, greater<int>> p;
	p.push(6);
	p.push(3);
	p.push(5);
	p.push(2);
	p.push(7);
	p.push(1);

	while (!p.empty()) {
		cout << p.top() << ' ';
		p.pop();
	}
	cout << endl;
}

void test3() {
	vector<int> v;
	v.push_back(9);
	v.push_back(65);
	v.push_back(12);
	v.push_back(13);
	v.push_back(54);
	v.push_back(35);
	v.push_back(29);
	v.push_back(6);
	priority_queue<int, vector<int>, greater<int>> p(v.begin(), v.end());
	//priority_queue<int> p(v.begin(), v.end());
	while (!p.empty()) {
		cout << p.top() << ' ';
		p.pop();
	}
	cout << endl;
}

int main() {
	test3();
	return 0;
}